home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.sprintlink.net!mv!usenet
- From: ENGR@GSSI.MV.COM (Michael Furman)
- Subject: Re: A question about declaring/passing arrays of structures
- Distribution: na
- Message-ID: <DLCJpw.66G@mv.mv.com>
- Mime-Version: 1.0
- Organization: GSSI
- Date: Wed, 17 Jan 1996 22:27:30 GMT
- References: <4djhdc$kp3@kira.cc.uakron.edu>
- X-Newsreader: WinVN 0.93.10
- X-Nntp-Posting-Host: gssi.mv.com
-
- In article <4djhdc$kp3@kira.cc.uakron.edu>, tberg@dax.cc.uakron.edu says...
- >
- > I have recently been having trouble getting a program to work. It
- >consists of 6 variables, which are all arrays of structures. It seems
- >that when I pass them to a function, (located in another file), the
- >compiler will flag a fatal error on some of them. They are all defined
- >properly in a '.h' file, and linked to from the main program file,
- >(containing the 'main' function). There is nothing really unique about
- >the functions that work. Most of them consist of a few character
- >variables, a few integers, and 5 of the 6 contain a character array, set
- >to a certain length by a constant.
- > The error that I get is a 'General Protection Error' at 0001:3???,
- >which seems low in memory. But, when I comment out a for-next loop
- >that is immediately after the function call, I get a 'Stack Fault' error
- >at ALMOST the same location. I'm baffled. I've had assembler, and
- >several programming courses, but this one puzzles me.
- > Does anybody have a possible solution? If so, e-mail PERSONALLY,
- >as I don't get to read the news often. Your help is VERY MUCH
- >appreciated, as I have been trying to remedy this problem for almost 4
- >months now, with no success!!
-
- It looks like your program just have a bug. More likely your are accesing
- some data using non initialized pointer or accessing array with wrong
- index value. Nobody can help you because you did not post your source
- code. If program is short you can post it - there is a chance that
- sombody will find what is wrong.
- But I would recommend you to find it yourself. Just use debugger, go thru
- program and check what it is doing.
-
- >
- >Tim Berg
- >
-
- --
- <<<<<<<< This is a copy of post to the newsgroup >>>>>>>>
- ---------------------------------------------------------------
- Michael Furman, (603)893-1109
- Geophysical Survey Systems, Inc. fax:(603)889-3984
- 13 Klein Drive - P.O. Box 97 engr@gssi.mv.com
- North Salem, NH 03073-0097 71543.1334@compuserve.com
- ---------------------------------------------------------------
-
-